package com.util;

import java.util.List;

import com.pojo.job.pa.PAJobPriviledge;

public class JobPriviledgeUtil {
	
	public static String  isChecked(String SAL_NO,List<PAJobPriviledge> pjps,String P){
		for(PAJobPriviledge pjp : pjps){
			if(pjp.getSALM().getSAL_NO().equals(SAL_NO)){
				if(P.equals("PNEW")&&pjp.getPNEW()==1){
					return "checked";
				}
				if(P.equals("PMODIFY")&&pjp.getPMODIFY()==1){
					return "checked";
				}
				if(P.equals("PREMOVE")&&pjp.getPREMOVE()==1){
					return "checked";
				}
				if(P.equals("PRIVACY")&&pjp.getPRIVACY()==1){
					return "checked";
				}
				if(P.equals("PSAVA")&&pjp.getPSAVA()==1){
					return "checked";
				}
				if(P.equals("PVIEW")&&pjp.getPVIEW()==1){
					return "checked";
				}
			}
		}
		return "";
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
